from typing import AsyncIterator, Any

import scrapy


class RequestParamsSpider(scrapy.Spider):
    name = "request_params"

    async def start(self):
        yield scrapy.Request(f"https://httpbin.org/get?name=wert", cb_kwargs={'age':10})


    async def parse(self, response, age):
        print(age, "-------")
        print(response.json())
        yield scrapy.FormRequest(f"https://httpbin.org/get", meta={"a": "aaa"}, cb_kwargs={'age': age, 'addr':'123'}, callback=self.parse2)

    def parse2(self, response, age, addr):
        print(age, addr, response.meta,"-------")
        print(response.json())
